import { createApp } from 'vue';
import App from './App.vue';
import { setupPlugins } from './plugins';
import { setupDirectives } from './directives';

// 重置样式
import 'normalize.css';
// 引入全局样式
import './styles/main.css';

import './permission';

console.log(' VITE_HI: ', import.meta.env);

const app = createApp(App);

app.directive('demo', (el: any, binding: DirectiveBinding<any>) => {
  console.log(binding.value.color); // => "white"
  console.log(binding.value.text); // => "hello!"
  el.style.color = binding.value;
});
// 注册自定义指令
setupDirectives(app);

// 安装插件
setupPlugins(app);

app.mount('#app');
